package com.yxr.affairs.api;

import com.yxr.affairs.api.model.CateMenuEntity;
import com.yxr.affairs.api.model.FourSeasonsEntity;
import com.yxr.affairs.api.model.HomeResultEntity;
import com.yxr.affairs.api.model.InvestListEntity;
import com.yxr.affairs.api.model.ResultEntity;
import com.yxr.affairs.api.model.child.Address_;
import com.yxr.affairs.api.model.child.CheckSign;
import com.yxr.affairs.api.model.child.Code;
import com.yxr.affairs.api.model.child.CouponList;
import com.yxr.affairs.api.model.child.CreditInfo;
import com.yxr.affairs.api.model.child.ExchangeGoods;
import com.yxr.affairs.api.model.child.GoodsDetail;
import com.yxr.affairs.api.model.child.GoodsList;
import com.yxr.affairs.api.model.child.IndexBanner;
import com.yxr.affairs.api.model.child.Login;
import com.yxr.affairs.api.model.child.MyCoupon;

import java.util.ArrayList;
import java.util.Map;

import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import rx.Observable;

public interface HttpService {

    @FormUrlEncoded
    @POST("/AppUser/userLogin")
    Observable<ResultEntity<Login>> getLogin(@Field("qbsource") String qbsource,
                                             @Field("agent") String agent,
                                             @Field("version_name") String version_name,
                                             @Field("app_version") String app_version,

                                             @Field("username") String username,
                                             @Field("password") String password);

    @GET("/AppUser/phoneCode")
    Observable<ResultEntity<Code>> getCode(@QueryMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/AppUser/forgetPassword")
    Observable<ResultEntity> getForgetPassword(@Field("qbsource") String qbsource,
                                             @Field("agent") String agent,
                                             @Field("version_name") String version_name,
                                             @Field("app_version") String app_version,

                                             @Field("phone") String phone,
                                             @Field("valicode") String valicode,
                                             @Field("password") String password,
                                             @Field("confirm") String confirm,
                                             @Field("sessionid") String sessionid);

    @GET("/AppIndexRequest/getIndexData")
    Observable<HomeResultEntity> getIndexData(@QueryMap Map<String, Object> maps);

    @GET("/AppInvestList/getCateMenu")
    Observable<CateMenuEntity> getCateMenu(@QueryMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/AppInvestList/getInvestList")
    Observable<InvestListEntity> getInvestList(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/LifeSite/AppAuthIndexRequest/indexBanner")
    Observable<ResultEntity<IndexBanner>> getIndexBanner(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/LifeSite/AppAuthIndexRequest/getGoodsList")
    Observable<ResultEntity<GoodsList>> getGoodsList(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/LifeSite/AppAuthGoods/getGoodsDetail")
    Observable<ResultEntity<GoodsDetail>> getGoodsDetail(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/LifeSite/AppAuthUserAddress/getShippingAddress")
    Observable<ResultEntity<ArrayList<Address_>>> getShippingAddress(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/LifeSite/AppAuthOrderProcess/exchangeGoods")
    Observable<ResultEntity<ExchangeGoods>> getExchangeGoods(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/AppAuthCredit/getCreditInfo")
    Observable<ResultEntity<CreditInfo>> getCreditInfo(@FieldMap Map<String, Object> maps);

    @FormUrlEncoded
    @POST("/AppAuthCredit/checkSign")
    Observable<ResultEntity<CheckSign>> getCheckSign(@FieldMap Map<String, Object> maps);

    @GET("/AppCoupon/FourSeasonsCouponList")
    Observable<FourSeasonsEntity> getFourSeasonsCouponList(@QueryMap Map<String, Object> maps);

    @GET("/AppAuthCoupon/drawSeasonsActiveCoupon")
    Observable<ResultEntity> getDrawSeasonsActiveCoupon(@QueryMap Map<String, Object> maps);

    @GET("/AppCoupon/couponList")
    Observable<ResultEntity<CouponList>> getCouponList(@QueryMap Map<String, Object> maps);

    @GET("/AppAuthCoupon/remind")
    Observable<ResultEntity> getRemind(@QueryMap Map<String, Object> maps);

    @GET("/AppAuthCoupon/draw")
    Observable<ResultEntity> getDraw(@QueryMap Map<String, Object> maps);

    @GET("/AppAuthCoupon/myList")
    Observable<ResultEntity<MyCoupon>> getMyCoupon(@QueryMap Map<String, Object> maps);

}
